﻿@model S4Store.Models.FinancialKpi.InputFinancialKpiDayDataModel
@{
    Layout = null;
    ViewBag.Title = "InputFinancialKpiDayData";
    S4Store.Domain.Administrator CurrentUser = (S4Store.Domain.Administrator)ViewBag.CurrentUser;
}

<form class="pageForm addpage" action="@Url.Action("ModifyBackInputFinancialKpiDayData")" method="post">
<div style=" height:100%; width:100%; overflow:hidden" class="verticalSplitContainer">
    
        <input type="hidden" value="@Model.Date.Year" name="y" />
        <input type="hidden" value="@Model.Date.Month" name="m" />
        <input type="hidden" value="@Model.Date.Day" name="d" />
  <div class="" style="overflow: auto;" ratio="#100">
        <table class="rpttable" style="border-collapse: collapse;">
            <tr height="90"  class="vtr">
  <th class="yellow" ><div class="wd20 pd510">车型名称</div></th>
  <th class="yellow" ><div class="wd20 pd520">销售总额(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">商品车销售额(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">装潢销售额(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">保险销售额(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">贷款服务额(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">二手车销售额(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">二手车毛利(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">延保销售额(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">售后毛利(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">事故车产值(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">保养产值(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">维修产值(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">备件产值(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">装潢产值(万)</div></th>
  <th class="yellow" ><div class="wd20 pd520">养护产品产值(万)</div></th>
 </tr>
 </table>
</div>
<div class="" style="overflow: auto;" ratio="*">
<table  class="rpttable"  style="border-collapse:collapse;">
     @{int index=-1;}
     @foreach(var brand in Model.CarBrands)
     {
             index++;
             var daydata = Model.GetDayData(brand.Id);
             <tr>
                            <td><div class="wd20 pd510">@brand.Name
                 <input type="hidden" value="@brand.Id" name="rows[@(index)].CarBrandId" />
                 <input type="hidden" name="rows[@(index)].Date" value="@daydata.Date.ToString("yyyy-MM-dd")" /></div>
             </td>

             
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].XSZE" value="@daydata.XSZE.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].SPCXSE" value="@daydata.SPCXSE.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].ZHXSE" value="@daydata.ZHXSE.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].BXXSE" value="@daydata.BXXSE" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].DKFWE" value="@daydata.DKFWE.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].ESCXSE" value="@daydata.ESCXSE.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].ESCML" value="@daydata.ESCML.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].YBXSE" value="@daydata.YBXSE.toInt()" class="w30 ipt numberinput" /></div></td>


             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].SHCZ" value="@daydata.SHCZ.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].SJCCZ" value="@daydata.SJCCZ.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].BYCZ" value="@daydata.BYCZ.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].WXCZ" value="@daydata.WXCZ.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].BJCZ" value="@daydata.BJCZ.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].ZHCZ" value="@daydata.ZHCZ.toInt()" class="w30 ipt numberinput" /></div></td>
             <td><div class="wd40 pd510"><input type="text" name="rows[@(index)].YHCPCZ" value="@daydata.YHCPCZ.toInt()" class="w30 ipt numberinput" /></div></td>
             
             </tr>
        
     }
 </tbody>
 </table>

        

    </div>
    @if (!Model.IsConfirmed || CurrentUser.Position == S4Store.Domain.Position.SystemManager)
    {
        <div class="formBar" ratio="#30">
            <ul>
                <li><div class="simplebutton"><div class="r"><button type="button" class="submit">保存</button></div></div></li>	
                <li>确认数据：<input type="checkbox" name="isconfirm" value="true" /></li>	
            </ul>
        </div>
    }
</div>
</form>